package com.fanjia.crm.mapper;

import com.fanjia.crm.model.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by FanJia on 2020/9/21 20:58
 */
public interface RoleMapper {
    public List<Role> findAllRoles();

    public void insert(Role role);

    /**
     *
     * @param id 角色id, 权限id
     * @param pmsId
     */
    public void insertRolePermission(int id, int pmsId);

    public Role findByRoleId(Integer roleId);

    public List<Integer> findPermissionIdsByRoleId(Integer roleId);

    public void deletePermissionByRoleId(int roleId);

    public void updateRoleByRole(Role role);

    public void insertRolePermissionBatch(@Param("roleId") Integer roleId,@Param("pmsIds") String[] pmsIds);

}
